package com.jk.bgmainconsumer.service;

import com.jk.bgmainconsumer.entity.MessageEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;

@Component
@FeignClient("bgmessageprovider")
public interface MessageSerivce {
    /**
     *
     * 分页查
     * @param messageEntity
     * @return
     */
    @RequestMapping(value = "message/selectAllMessage",method = RequestMethod.POST)
    HashMap<String,Object> selectAllMessage(@RequestBody MessageEntity messageEntity);

    /**
     * 单删
     */
    @RequestMapping("message/delOneMessage")
     void delOneMessage(@RequestParam Integer inforId);

    /**
     * 修改回显
     * @param inforId
     * @return
     */
    @RequestMapping("message/updateSelMessage")
    MessageEntity updateSelMessage(@RequestParam Integer inforId);

    @RequestMapping(value = "message/addOrUpdate",method = RequestMethod.POST)
    String addOrUpdate(@RequestBody MessageEntity messageEntity);
}
